﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Mysoft.MyCM.Scm;
using Mysoft.MyCM.Business;
using Mysoft.MyCM.Business.Scm;

namespace Mysoft.MyCM.Web.Controllers.WebApi.Scm
{
	/// <summary>
	/// SCM-TFS客户Api（包含附加信息）
	/// </summary>
	public class Scm_Custom2Controller : BaseApiController
    {
		private CustomBLL _bll = new CustomBLL();

		/// <summary>
		/// 根据客户Id获取客户详情（包含附加信息）
		/// </summary>
		/// <param name="param">客户Id</param>
		/// <returns></returns>
		public Custom2 Get(Guid param)
		{
			return _bll.GetCustom2(param);
		}

		/// <summary>
		/// 根据客户简称（代码）获取客户详情（包含附加信息）
		/// </summary>
		/// <param name="customCode">客户简称（代码）</param>
		/// <returns></returns>
		[ActionName("Get")]
		public Custom2 GetByCode(string customCode)
		{
			return _bll.GetCustom2(customCode);
		}
    }
}
